home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Just Call Me Internet
/
Just Call Me Internet.iso
/
com
/
computer
/
casio_st
/
prog_fx
/
divers
/
proust2.sha
< prev
next >
Wrap
Text File
|
1994-03-01
|
1KB
|
39 lines
5 ERASE O,TT,TP:DIM O(I),TT(I,2),TP(J-1):POS1=0:POS2=J:CLS
7 FOR NB=1 TO J-2:POS1=POS1+1:POS2=POS2-1
8 FOR U=1 TO I:TT(U,0)=U:O(U)=0
9 TT(U,1)=T(U,POS1)+TT(U,1):TT(U,2)=T(U,POS2)+TT(U,2)
11 IF A$="P" THEN 12 ELSE 14
12 TT(U,1)=TT(U,1)+M(U,1)-M(U,POS2):TT(U,2)=TT(U,2)+D(U,J-1)-D(U,POS1)
13 IF NB>=2 THEN TT(U,1)=TT(U,1)-M(U,1)+M(U,POS2+1):TT(U,2)=TT(U,2)-D(U,J-1)+D(U,POS1-1)
14 PRINT U;TT(U,1);TT(U,2):NEXT U
15 PRINT "PB";NB;"Ordre:";:CA=0:CB=I+1
20 FOR U=1 TO I
25 A=1E5:B=1E5
30 FOR V=1 TO I
35 IF TT(V,0)>I THEN 80
40 IF TT(V,1)<A THEN A=TT(V,1):TA=TT(V,0)
50 IF TT(V,2)<B THEN B=TT(V,2):TB=TT(V,0)
80 NEXT V
87 IF A>B THEN 88 ELSE CA=CA+1:O(CA)=TA:TT(TA,0)=I+1:GOTO 90
88 CB=CB-1:O(CB)=TB:TT(TB,0)=I+1
90 NEXT U
100 FOR U=1 TO I
110 PRINT O(U);
120 NEXT U:TA=0:TB=TT(O(1),1):PRINT
155 REM CALCUL TEMPS
180 FOR V=1 TO J-1:TP(V)=0:NEXT V
200 FOR V=2 TO J-1
210 TP(V)=TP(V-1)+T(O(1),V-1)+M(O(1),V-1)+D(O(1),V-1)
220 NEXT V
230 FOR U=1 TO I-1
240 FOR V=1 TO J-1
250 TP(V)=TP(V)+T(O(U),V)+M(O(U),V)+D(O(U),V)
260 NEXT V
270 FOR V=1 TO J-2
275 INE=T(O(U+1),V)+M(O(U+1),V)+D(O(U+1),V)
280 IF TP(V+1)<(TP(V)+INE) THEN TP(V+1)=TP(V)+INE
290 NEXT V
300 NEXT U
310 RES=TP(V)+T(O(U),V)+M(O(U),V)+D(O(U),V):PRINT "Temps ";RES
320 NEXT NB